public class Duck {
    protected String color;
    protected double heavy;

    public Duck(){
        this.color = "白色";
        this.heavy = 1.0;
    }

    public Duck(String color, double heavy){
        this.color = color;
        this.heavy = heavy;
    }

    public void fly(){
        System.out.println(color + "的鸭子正在飞行");
    }

    public void quack(){
        System.out.println(color + "的鸭子正在嘎嘎叫");
    }

    public void setHeavy(double heavy){
        this.heavy = heavy;
        System.out.println("这是一只" + color + "的鸭子，重量：" + heavy);
    }

    public void displayInfo(){
        System.out.println("这是一只" + color + "的鸭子，重量：" + heavy + "kg");
    }

    public String getColor(){
        return color;
    }

    public void setColor(String color){
        this.color = color;
    }

    public double getHeavy(){
        return heavy;
    }
}
